package com.qk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qk.dto.BusinessDto;
import com.qk.dto.BusinessPoolDto;
import com.qk.entity.Business;
import com.qk.vo.OverviewVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BusinessMapper extends BaseMapper<Business> {
    Page<Business> listBusiness(Page<Business> businessPage, BusinessDto businessDto);

    Business getBusinessById(Integer id);

    OverviewVo getBusinessOverview();

    @Select("SELECT * FROM business WHERE status = 4 order by update_time desc ")
    Page<Business> listUserBusiness(Page<Business> businessPage, BusinessPoolDto businessPoolDto);
}
